package com.shanzhi.dify.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum DifyUrlEnums implements BaseEnum {

    /**
     * 工作流、Agent等对话接口
     */
    WORKFLOWS_RUN_URL(0, "/workflows/run", "工作流执行接口"),
    CHAT_FLOW_URL(1, "/chat-messages", "聊天接口"),


    /**
     * 消息历史等接口
     */
    CONVERSATIONS_URL(100, "/conversations", "消息历史接口"),


    /**
     * 知识库相关接口
     */
    DATASETS_URL(200, "/datasets", "知识库接口"),
    DATASETS_DETAIL_URL(201, "/datasets/{dataset_id}", "知识库详情接口"),
    DATAS_SEARCH_URL(202, "/datasets/{datasetId}/retrieve", "知识库搜索"),


    /**
     * 文档
     */
    UPLOAD_DOCUMENTS_URL(300, "/datasets/{datasetId}/documents/{documentId}/upload-file", "上传文件"),

    DATASETS_DOCUMENTS_URL(301, "/datasets/{dataset_id}/documents", "文档接口"),
    CREATE_DOCUMENT_FILE_URL(302,"/datasets/{dataset_id}/document/create-by-file","通过文件创建文档"),
    DELETE_DOCUMENT_URL(303, "/datasets/{dataset_id}/documents/{document_id}", "删除文档"),


    /**
     * 文档块
     */
    LIST_CHUNKS_URL(400, "/datasets/{dataset_id}/documents/{document_id}/segments", "文档块列表"),
    DELETE_CHUNK_URL(401, "/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}", "删除+修改文档块"),
    DOCUMENTS_SEGMENTS_CHILD_CHUNKS_URL(402, "/datasets/{datasetId}/documents/{documentId}/segments/{segmentId}/child_chunks", "文档块"),



    ;
    private Integer code;

    private String urlSuffix;

    private String desc;
}
